/*
 * MemberBO.java
 * 
 * Created on February 19, 2007, 10:31 PM
 *
 * This class is the membership Business Object. It contains all attributes
 * of a member.
 */

package edu.byu.isys413.jjenkins.data;

import java.sql.Date;
import java.util.LinkedList;
import java.util.List;

/**
 *
 * @author Jeff
 *
 * This class is the membership Business Object. It contains all attributes
 * of a member.
 */


public class MemberBO extends BusinessObject{
    
    private String creditCard = null;
    private Date startDate = null;
    private Date expireDate = null;
    private CustomerBO customer = null;
    private double backupSize = 0;
    private boolean backupNotice = false;
    private Date backupEndDate = null;
    private List areasOfInterest = new LinkedList();
    private boolean interestDirty = false;
    
    
    /** Creates a new instance of MemberBO
     * Sets Customer. This could probably be done a better way*/
    public MemberBO() {
        
    }
   /* getsthe members's credit card number
    * @Return: String: creditcardNumber*/
    public String getCreditCard() {
        return creditCard;
    }
    
   /* sets the members's credit card number
    * @par: String: creditcardNumber*/
    public void setCreditCard(String creditCard) {
        this.creditCard = creditCard;
        setDirty(true);
        
    }
    
   /* gets the membership start date
    * @return: String: start date*/
    public Date getStartDate() {
        return startDate;
    }
    
  /* sets the membership start date
   * @par: String: start date*/
    public void setStartDate(Date startDate) {
        this.startDate = startDate;
        setDirty(true);
    }
    
   /* gets the membership ccard experiation date
    * @return: String: experation date*/
    public Date getExpireDate() {
        return expireDate;
    }
    
   /* sets the membership ccard experiation date
    * @par: String: experation date*/
    public void setExpireDate(Date expireDate) {
        this.expireDate = expireDate;
        setDirty(true);
    }
    
    /* gets the member's customer account
     * @returns: CustomerBO customer*/
    public CustomerBO getCustomer() {
        return customer;
    }
    
    /* sets the member's customer account
     * @par: CustomerBO customer*/
    public void setCustomer(CustomerBO customer) {
        this.customer = customer;
        setDirty(true);
    }
    
   /* gets the member's areas of interest
   * @returns: List areas of interest*/
    public List getAreasOfInterest() {
        return areasOfInterest;
    }
    
   /* sets the member's areas of interest
   * @par: List areas of interest*/    
    public void setAreasOfInterest(List areasOfInterest) {
        this.areasOfInterest = areasOfInterest;
        setDirty(true);
    }
    
   /* adds a new area of interest to the list
   * @par: String interestID*/     
    public void setAreaOfInterest(String interestID){
        areasOfInterest.add(interestID);
        setInterestDirty(true);
        
    }
    
  /* removes an area of interest from the list
   * @par: String interestID*/     
    public void deleteAreaOfInterest(String interestID){
        areasOfInterest.remove(interestID);
        setInterestDirty(true);
        
    }
    
  /* shows if the interest have been changed
   * @return: boolean interest*/
    public boolean isInterestDirty() {
        return interestDirty;
    }
    
  /* sets if the intersest have changed
   * @par: Boolen interestDirty*/
    public void setInterestDirty(boolean interestDirty) {
        this.interestDirty = interestDirty;
    }
    
  /** getsthe backupSize
   * @return: double backupSize*/
    public double getBackupSize() {
        return backupSize;
    }
    
  /** sets the backupSize
   * @param: double backupSize*/
    public void setBackupSize(double backupSize) {
        this.backupSize = backupSize;
    }
  /** gets the backupNotice 
   * @return: boolean true if notice was sent*/
    public boolean getBackupNotice() {
        return backupNotice;
    }

  /** sets the backupNotice 
   * @param: boolean true if notice was sent*/
    public void setBackupNotice(boolean backupNotice) {
        this.backupNotice = backupNotice;
    }
    
  /** gets the backupEnd date 
   * @return: Date the date the backup expries*/
    public Date getBackupEndDate() {
        return backupEndDate;
    }
    
  /** gets the backupEnd date 
   * @return: Date the date the backup expries*/
    public void setBackupEndDate(Date backupEndDate) {
        this.backupEndDate = backupEndDate;
    }
}
